<template>
  <a-form
    :label-col="{ span: 1 }"
    :wrapper-col="{ span: 23 }"
    autocomplete="off"
    labelAlign="left"
  >
    <a-form-item label="占地面积" extra="单位:平方">
      <a-input v-model:value="formValue.areaCovered" />
    </a-form-item>
    <a-form-item label="建筑面积">
      <a-input v-model:value="formValue.buildupArea" />
    </a-form-item>
    <a-form-item label="容积率">
      <a-input v-model:value="formValue.plotRatio" />
    </a-form-item>
    <a-form-item label="绿化率" extra="%">
      <a-input v-model:value="formValue.greeningRate" />
    </a-form-item>
    <a-form-item label="车位比">
      <a-input v-model:value="formValue.parkingRate" />
    </a-form-item>
    <a-form-item label="楼栋总数" extra="栋">
      <a-input v-model:value="formValue.buildingTotalNum" />
    </a-form-item>
    <a-form-item label="总户数">
      <a-input v-model:value="formValue.houseTotalNum" />
    </a-form-item>
    <a-form-item label="物业公司">
      <a-input v-model:value="formValue.estateCompany" />
    </a-form-item>
    <a-form-item label="物业费">
      <a-input v-model:value="formValue.propertyFee" />
    </a-form-item>
    <a-form-item label="楼层状况">
      <a-input v-model:value="formValue.floorCondition" />
    </a-form-item>
  </a-form>
</template>
<script lang="ts">
import {
  defineComponent,
  ref,
  reactive,
  onMounted,
  onBeforeUnmount,
  defineEmits,
} from "vue";

import { copyObjVal } from "@/utils/common";

import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
dayjs.locale("zh-cn");

import AreaSelector from "@/components/area/threeAreaSelector/index.vue";
import { getData } from "../../../../api/table";

export default defineComponent({
  components: { AreaSelector },
  setup(props, context) {
    const areaSelector = ref();

    const formValue = ref({
      areaCovered: "", //占地面积
      buildupArea: "", //建筑面积
      plotRatio: "", //容积率
      greeningRate: "", //绿化率
      parkingRate: "", //车位比
      buildingTotalNum: "", //楼栋总数
      houseTotalNum: "", //总户数
      estateCompany: "", //物业公司
      propertyFee: "", //物业费
      floorCondition: "", //楼层状况
    } as any);

    const getData = () => {
      let target = {};
      copyObjVal(formValue.value, target);
      return target;
    };

    return {
      formValue,
      areaSelector,
      getData,
    };
  },
});
</script>
